small_amount(A) :- between(0, 200, A).
middle_amount(A) :- between(200, 700, A).
big_amount(A) :- A > 700. 

ok(X,_) :- small_amount(X).
ok(X,Y) :- middle_amount(X), Y > 100.
ok(X,Y) :- big_amount(X), Y > 350.

run(X,Y) :- (ok(X,Y) -> print(user_output, 'true.\n'); print(user_output, 'fail.\n')).
